from _03_fibo import Fib, sumFib
#from _03_fibo import *
#import sys

while True:
    num = eval(input("输入斐波那契数列的n项："))
    #num = int(sys.argv[1])
    if num == 0:  # 输入num=0时，退出循环
        break
    lstFib = Fib(num)
    sum = sumFib(num)
    print("斐波那契额数列的前{}项是：{}".format(num, lstFib))
    print("斐波那契数列前{}项之和为：{}".format(num, sum))
    # break
